package de.nabble.model;

import java.util.NoSuchElementException;

public class Player {
	private int points;
	private LetterRow row;
	private String name;
	
	public Player(String name, LetterRow row) {
		this.row = row;
		this.name = name;
	}
	
	public Letter takeLetterFromRow(Letter l) {
		if(row.containsLetter(l)) {
			return l;
		}
		
		throw new NoSuchElementException();
	}
	
	public int getPoints() {
		return points;
	}

	public void setPoints(int points) {
		this.points = points;
	}

	public String getName() {
		return name;
	}
}
